# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=bonzomatic
_datever=2020-05-09
pkgver=${_datever//-/}
pkgrel=0
pkgdesc="OpenGL shader livecoding toy"
url="https://github.com/Gargaj/Bonzomatic"
arch="all"
license="Unlicense"
depends=""
makedepends="cmake fontconfig-dev mesa-dev alsa-lib-dev libxrandr-dev libxinerama-dev libxcursor-dev glu-dev libxi-dev"
install=""
subpackages=""
source="https://github.com/Gargaj/Bonzomatic/archive/$_datever/bonzomatic-$_datever.tar.gz"
builddir="$srcdir/Bonzomatic-$_datever"
options="!check" # no test suite

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		${CMAKE_CROSSOPTS} .
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="550d2cb1a4c135824782b0f9577f51b62f940f0c915a55861c241bd2937d91c2233c4ce5e4563e8d8a63237bc3b5e1273e738a912ee8ab1d5f62ad7bbdac5c33  bonzomatic-2020-05-09.tar.gz"
